package com.nanyang.tms.dao.saleprice;

import com.nanyang.tms.domain.saleprice.SalePriceDO;
import com.nanyang.tms.domain.saleprice.SalePriceQuery;
import com.nanyang.tms.domain.saleprice.SalePriceVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>SalePriceDao.java</p>
 * <p>Description:()</p>
 *
 * @author lv
 * @date 2022年11月12日 下午05:46:06
 * @Copyright Copyright (c) 2020 www.nanyang.cn Inc. All rights reserved.
 */
@Mapper
public interface SalePriceDao {
    /**
     * <p>deleteByPrimaryKey</p>
     * <p>Description:(根据主键删除)</p>
     *
     * @param id
     * @return int
     */
    int deleteByPrimaryKey(Long id);

    /**
     * <p>insert</p>
     * <p>Description:(新增（所有列）)</p>
     *
     * @param record
     * @return int
     */
    int insert(SalePriceDO record);

    /**
     * <p>selectByPrimaryKey</p>
     * <p>Description:(根据主键查询)</p>
     *
     * @param id
     * @return SalePriceDO
     */
    SalePriceDO selectByPrimaryKey(Long id);

    /**
     * <p>updateByPrimaryKeySelective</p>
     * <p>Description:(修改(选择的列))</p>
     *
     * @param record
     * @return int
     */
    int update(SalePriceDO record);

    /**
     * <p>countSale</p>
     * <p>Description:总数</p>
     *
     * @param query
     * @return
     */
    Integer countSale(SalePriceQuery query);

    /**
     * <p>listSale</p>
     * <p>Description:列表</p>
     *
     * @param query
     * @return
     */
    List<SalePriceVO> listSale(SalePriceQuery query);
    /**
     * <p>enableState</p>
     * <p>Description:(启用)</p>
     *
     * @param saleInfoDO
     * @return int
     */
    int enableState(SalePriceDO saleInfoDO);

    /**
     * <p>disableState</p>
     * <p>Description:(禁用)</p>
     *
     * @param saleInfoDO
     * @return int
     */
    int disableState(SalePriceDO saleInfoDO);

    /**
     * 查询名称是否存在
     * @param query
     * @return
     */
    Integer queryVerifySale(SalePriceQuery query);

    /**
     * <p>selectByPrimaryKey</p>
     * <p>Description:(根据主键查询)</p>
     *
     * @param saleCode
     * @return SalePriceVO
     */
    SalePriceVO selectByCode(String saleCode);
}